<template>
	<view class="rootdiv">
		<view class="imgdiv" v-for="(item,index) in lstVideo">
			<video :src="baseUrl+item.fileUrl" object-fit="fill" controls ></video>
		</view>
	</view>
</template>

<script>
	import {
		getBannerById
	} from "@/api/api.js";
	import {
		is,
		getUrl
	} from '@/config.js'
	export default {
		data() {
			return {
				lstVideo: [],
				baseUrl: ""
			}
		},
		methods: {

		},
		onLoad(options) {
			console.log('视频',options)
			var me = this;
			this.baseUrl = getUrl();
			var bannerInfo = JSON.parse(decodeURIComponent(options.bannerInfo));
			getBannerById(bannerInfo.bannerId).then(
				(res) => {
					me.lstVideo = res.data.sysBannerItemList;
				}
			);
		},
	}
</script>

<style scoped>
	.rootdiv {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.imgdiv {
		width: 640rpx;
		height: 340rpx;
		background-color: #ffffff;
		border-radius: 25rpx;
		margin-top: 32rpx;
		box-shadow: 0px 6px 16px 0px rgba(75, 126, 139, 0.1);
	}
	.imgdiv video{
		width: 100%;
		height: 100%;
		border-radius: 25rpx
	}
</style>
